<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    874. Backspace String Compare
   </h1>
   <p>
    Given two&nbsp;strings&nbsp;
    <code>
     S
    </code>
    &nbsp;and
    <code>
     T
    </code>
    ,&nbsp;return if they are equal when both are typed into empty text editors.
    <code>
     #
    </code>
    means a backspace character.
   </p>
   <div>
    <p>
     <strong>
      Example 1:
     </strong>
    </p>
    <pre>
<strong>Input: </strong>S = <span id="example-input-1-1">"ab#c"</span>, T = <span id="example-input-1-2">"ad#c"</span>
<strong>Output: </strong><span id="example-output-1">true
</span><span><strong>Explanation</strong>: Both S and T become "ac".</span>
</pre>
    <div>
     <p>
      <strong>
       Example 2:
      </strong>
     </p>
     <pre>
<strong>Input: </strong>S = <span id="example-input-2-1">"ab##"</span>, T = <span id="example-input-2-2">"c#d#"</span>
<strong>Output: </strong><span id="example-output-2">true
</span><span><strong>Explanation</strong>: Both S and T become "".</span>
</pre>
     <div>
      <p>
       <strong>
        Example 3:
       </strong>
      </p>
      <pre>
<strong>Input: </strong>S = <span id="example-input-3-1">"a##c"</span>, T = <span id="example-input-3-2">"#a#c"</span>
<strong>Output: </strong><span id="example-output-3">true
</span><span><strong>Explanation</strong>: Both S and T become "c".</span>
</pre>
      <div>
       <p>
        <strong>
         Example 4:
        </strong>
       </p>
       <pre>
<strong>Input: </strong>S = <span id="example-input-4-1">"a#c"</span>, T = <span id="example-input-4-2">"b"</span>
<strong>Output: </strong><span id="example-output-4">false
</span><span><strong>Explanation</strong>: S becomes "c" while T becomes "b".</span>
</pre>
       <p>
        <span>
         <strong>
          Note
         </strong>
         :
        </span>
       </p>
       <ol>
        <li>
         <code>
          <span>
           1 &lt;= S.length &lt;= 200
          </span>
         </code>
        </li>
        <li>
         <code>
          <span>
           1 &lt;= T.length &lt;= 200
          </span>
         </code>
        </li>
        <li>
         <span>
          <code>
           S
          </code>
          &nbsp;and
          <code>
           T
          </code>
          only contain&nbsp;lowercase letters and
          <code>
           '#'
          </code>
          characters.
         </span>
        </li>
       </ol>
       <p>
        <strong>
         Follow up:
        </strong>
       </p>
       <ul>
        <li>
         Can you solve it in
         <code>
          O(N)
         </code>
         time and
         <code>
          O(1)
         </code>
         space?
        </li>
       </ul>
      </div>
     </div>
    </div>
   </div>
  </div>
  <div>
   <h1 class="question_title">
    874. 比较含退格的字符串
   </h1>
   <p>
    给定
    <code>
     S
    </code>
    和
    <code>
     T
    </code>
    两个字符串，当它们分别被输入到空白的文本编辑器后，判断二者是否相等，并返回结果。
    <code>
     #
    </code>
    代表退格字符。
   </p>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     示例 1：
    </strong>
   </p>
   <pre><strong>输入：</strong>S = "ab#c", T = "ad#c"
<strong>输出：</strong>true
<strong>解释：</strong>S 和 T 都会变成 &ldquo;ac&rdquo;。
</pre>
   <p>
    <strong>
     示例 2：
    </strong>
   </p>
   <pre><strong>输入：</strong>S = "ab##", T = "c#d#"
<strong>输出：</strong>true
<strong>解释：</strong>S 和 T 都会变成 &ldquo;&rdquo;。
</pre>
   <p>
    <strong>
     示例 3：
    </strong>
   </p>
   <pre><strong>输入：</strong>S = "a##c", T = "#a#c"
<strong>输出：</strong>true
<strong>解释：</strong>S 和 T 都会变成 &ldquo;c&rdquo;。
</pre>
   <p>
    <strong>
     示例 4：
    </strong>
   </p>
   <pre><strong>输入：</strong>S = "a#c", T = "b"
<strong>输出：</strong>false
<strong>解释：</strong>S 会变成 &ldquo;c&rdquo;，但 T 仍然是 &ldquo;b&rdquo;。</pre>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     提示：
    </strong>
   </p>
   <ol>
    <li>
     <code>
      1 &lt;= S.length &lt;= 200
     </code>
    </li>
    <li>
     <code>
      1 &lt;= T.length &lt;= 200
     </code>
    </li>
    <li>
     <code>
      S
     </code>
     和
     <code>
      T
     </code>
     只含有小写字母以及字符
     <code>
      '#'
     </code>
     。
    </li>
   </ol>
   <p>
    &nbsp;
   </p>
  </div>
 </body>
</html>